﻿$(function () {

    var EV_TOUCH = 'click';

    var common = {
        postAjax: function (url, data, success) {
            var hs = document.getElementsByName('__RequestVerificationToken');
            if (hs.length > 0) {
                data = data || {};
                data["__RequestVerificationToken"] = hs[0].value;
            }
            $.ajax({
                url: url,
                cache: false,
                type: 'post',
                dataType: 'json',
                data: data,
                success: success
            });
        }
    };

    (function (ns) {
        $.init();

        ns.back = function (reload) {
            if (reload && sessionStorage) {
                sessionStorage.setItem("_back_reload", "1")
            }
            $.router.back();
        };

        ns.reloadOnBack = function () {
            if (sessionStorage && sessionStorage.getItem("_back_reload") == "1") {
                sessionStorage.removeItem("_back_reload")
                location.reload();
            }
        };
    })(window.Util = {});

    /*
    var adaptSize = function () {
        var winWidth = $(window).height();
        var h1 = $('#module-personal').height();
        var h2 = $('#module-record').height();
        $('#module-prepaid').height(h1 + h2 + winWidth * 0.01);
    }

    $(window).on('resize', function () {
        adaptSize();
    });
    */


});